<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLogisticsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // 物流模块
        Schema::create('logistics', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('公司名称');
            $table->string('number')->comment('公司编号');
            $table->string('logo')->comment('公司logo')->nullable();
            $table->unsignedTinyInteger('order')->comment('排序')->default(100);
            $table->string('contact_phone')->comment('联系方式')->nullable();
            $table->boolean('status')->default(true)->comment('是否开启');
            $table->boolean('is_default')->default(false)->comment('是否是默认');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('logistics');
    }
}
